.TH std::experimental::filesystem::begin(recursive_directory_iterator), 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::experimental::filesystem::begin(recursive_directory_iterator), \- std::experimental::filesystem::begin(recursive_directory_iterator),

.SH Synopsis

   recursive_directory_iterator begin( recursive_directory_iterator \fB(1)\fP (filesystem TS)
   iter );
   recursive_directory_iterator end( const                          \fB(2)\fP (filesystem TS)
   recursive_directory_iterator& );

   1) Returns iter unchanged.
   2) Returns a default-constructed recursive_directory_iterator, which serves as the
   end iterator. The argument is ignored.

   These non-member functions enable the use of recursive_directory_iterators with
   range-based for loops.

.SH Parameters

   iter - a recursive_directory_iterator

.SH Return value

   1) iter unchanged.
   2) End iterator (default-constructed recursive_directory_iterator).

.SH Exceptions

   noexcept specification:
   noexcept


.SH Example


// Run this code

 #include <experimental/filesystem>
 #include <fstream>
 #include <iostream>
 namespace fs = std::experimental::filesystem;

 int main()
 {
     fs::create_directories("sandbox/a/b");
     std::ofstream("sandbox/file1.txt");
     fs::create_symlink("a", "sandbox/syma");
     for (auto& p : fs::recursive_directory_iterator("sandbox"))
         std::cout << p << '\\n';
     fs::remove_all("sandbox");
 }

.SH Possible output:

 "sandbox/a"
 "sandbox/a/b"
 "sandbox/file1.txt"
 "sandbox/syma"

.SH See also

   filesystem::begin(filesystem::directory_iterator) range-based for loop support
   filesystem::end(filesystem::directory_iterator)   \fI(function)\fP

.SH Categories:
     * Noindexed pages
     * unconditionally noexcept
.SH Hidden categories:
     * Pages with unreviewed unconditional noexcept template
     * Pages with unreviewed noexcept template
